/*******************************************************************************
 * Copyright (c) 2008-2010 Cedric Vidal
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Cedric Vidal - original idea, initial contribution and API
 *******************************************************************************/

package org.trans4j.issues;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.trans4j.Trans4j;

/**
 * @author <a href="mailto:c.vidal@proxiad.com">Cedric Vidal, ProxiAD Group</a>
 * 
 */
public class Issue11_CallingRuleTwiceWithSameFinalArgumentShouldReturnSameResult {

	@Test
	public void test() {
		T transfo = Trans4j.mapper(T.class);
		transfo.entryRule();
	}

	static class T {

		public void entryRule() {
			String banana = "Banana";
			assertEquals("a", rule(banana));
			assertEquals("a", rule(banana));
		}

		public String rule(Object object) {
			return "a";
		}

	}

}
